<template>
  <div class="detail-tab5">
    <div class="item">
      <div class="title">授权信息表</div>
      <el-table :data="tableData1" class="tableBoxChild">
        <!-- <el-table-column label="序号" align="center" type="index">
        </el-table-column> -->
        <el-table-column
          prop="dateOfAnnouncement"
          label="公告日期"
          align="center"
        >
        </el-table-column>
        <el-table-column prop="deadlineDate" label="截止日期" align="center">
        </el-table-column>
        <el-table-column
          prop="creditAmountTotal"
          label="授信总额度（亿元）"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="creditAmountUsed"
          label="已使用授信额度（亿元）"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="creditAmountNotUsed"
          label="未使用授信额度（亿元）"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="numberOfCreditInstitutions"
          label="授信机构家数"
          align="center"
        >
        </el-table-column>
      </el-table>
    </div>
    <div class="item">
      <div class="title">我行授权信息表</div>
      <el-table :data="tableData2" class="tableBoxChild">
        <!-- <el-table-column label="序号" align="center" type="index">
        </el-table-column> -->
        <el-table-column prop="creditVariety" label="授信品种" align="center">
        </el-table-column>
        <el-table-column prop="startDate" label="授信开始日期" align="center">
        </el-table-column>
        <el-table-column prop="deadlineDate" label="截止日期" align="center">
        </el-table-column>
        <el-table-column
          prop="creditAmountTotal"
          label="授信额度（亿元）"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="creditAmountUsed"
          label="已使用授信额度（亿元）"
          align="center"
        >
        </el-table-column>
        <el-table-column
          prop="creditAmountNotUsed"
          label="未使用授信额度（亿元）"
          align="center"
        >
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
import {
  CreditInformation,
  OurBanksCreditInformation,
} from "@/api/customerManagement/issuerManagement/issuer.js";

export default {
  name: "DetailTab5",
  props: {
    rowData: {
      type: Object,
      default: {},
    },
  },
  data() {
    return {
      tableData1: [],
      tableData2: [],
    };
  },
  mounted() {},
  created() {
    this.getData();
  },
  methods: {
    async getData() {
      const params = {
        customerId: this.rowData.customerId,
      };
      const data1 = await CreditInformation(params);
      this.tableData1 = data1.data;
      const data2 = await OurBanksCreditInformation(params);
      this.tableData2 = data2.data;
    },
  },
};
</script>

<style lang="scss" scoped>
.detail-tab5 {
  .item {
    color: #ffffff;
    .title {
      font-size: 16px;
      margin-bottom: 20px;
    }
  }
}
</style>
